package cn.stylefeng.guns.modular.promotion.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
 * @author allen
 * @date 2021/4/11 17:19
 * @version 1.0
 */
/**
    * 优惠券表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "promotion_coupon")
public class PromotionCouponEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 优惠券名称
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 优惠券类型，1：现金券，2：满减券
     */
    @TableField(value = "`type`")
    private Integer type;

    /**
     * 优惠券规则
     */
    @TableField(value = "`rule`")
    private String rule;

    /**
     * 有效期开始时间
     */
    @TableField(value = "valid_start_time")
    private Date validStartTime;

    /**
     * 有效期结束时间
     */
    @TableField(value = "valid_end_time")
    private Date validEndTime;

    /**
     * 优惠券发行数量
     */
    @TableField(value = "give_out_count")
    private Long giveOutCount;

    /**
     * 优惠券已经领取的数量
     */
    @TableField(value = "received_count")
    private Long receivedCount;

    /**
     * 优惠券发放方式，1：可发放可领取，2：仅可发放，3：仅可领取
     */
    @TableField(value = "give_out_type")
    private Integer giveOutType;

    /**
     * 优惠券状态，1：未开始；2：发放中，3：已发完；4：已过期
     */
    @TableField(value = "`status`")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @TableField(value = "gmt_modified")
    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_TYPE = "type";

    public static final String COL_RULE = "rule";

    public static final String COL_VALID_START_TIME = "valid_start_time";

    public static final String COL_VALID_END_TIME = "valid_end_time";

    public static final String COL_GIVE_OUT_COUNT = "give_out_count";

    public static final String COL_RECEIVED_COUNT = "received_count";

    public static final String COL_GIVE_OUT_TYPE = "give_out_type";

    public static final String COL_STATUS = "status";

    public static final String COL_GMT_CREATE = "gmt_create";

    public static final String COL_GMT_MODIFIED = "gmt_modified";
}